package Reflection;

import java.lang.reflect.Method;
import java.util.Arrays;

public class demo10 {
    public static void main(String[] args) {
        //先获取class对象
        Class c = Cat.class;
        //再获取全部public修饰的方法
        Method[] methods = c.getDeclaredMethods();
        for (Method method : methods) {
            System.out.println(method.getName() + " =>" + Arrays.toString(method.getParameterTypes()) +  " => " + method.getReturnType());
        }
    }
}
